package com.ruoyi.business.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 微信小程序订单对象 wx_order
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单ID */
    private Long orderId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNo;

    /** 微信用户openid */
    @Excel(name = "微信用户openid")
    private String openid;
    
    /** 地址ID */
    private Long addressId;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal payAmount;

    /** 支付方式（1微信 2支付宝） */
    @Excel(name = "支付方式", readConverterExp = "1=微信,2=支付宝")
    private String payType;

    /** 订单状态（0待付款 1待发货 2待收货 3已完成 4已取消 5申请退款 6已退款） */
    @Excel(name = "订单状态", readConverterExp = "0=待付款,1=待发货,2=待收货,3=已完成,4=已取消,5=申请退款,6=已退款")
    private String status;

    /** 支付时间 */
    @Excel(name = "支付时间")
    private String payTime;
    
    /** 发货时间 */
    @Excel(name = "发货时间")
    private String shipTime;
    
    /** 完成时间 */
    @Excel(name = "完成时间")
    private String finishTime;
    
    /** 取消时间 */
    @Excel(name = "取消时间")
    private String cancelTime;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String receiverName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String receiverPhone;

    /** 收货人地址 */
    @Excel(name = "收货人地址")
    private String receiverAddress;
    
    /** 退款原因 */
    @Excel(name = "退款原因")
    private String refundReason;
    
    /** 评分(1-5) */
    @Excel(name = "评分")
    private Integer rating;
    
    /** 评价内容 */
    @Excel(name = "评价内容")
    private String comment;
    
    /** 评价时间 */
    @Excel(name = "评价时间")
    private String reviewTime;
    
    /** 订单备注 */
    @Excel(name = "订单备注")
    private String orderRemark;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;
    
    /** 订单明细列表 */
    private List<OrderItem> items;

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }

    public void setOrderNo(String orderNo)
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo()
    {
        return orderNo;
    }

    public void setOpenid(String openid)
    {
        this.openid = openid;
    }

    public String getOpenid()
    {
        return openid;
    }
    
    public void setAddressId(Long addressId)
    {
        this.addressId = addressId;
    }

    public Long getAddressId()
    {
        return addressId;
    }

    public void setTotalAmount(BigDecimal totalAmount)
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount()
    {
        return totalAmount;
    }

    public void setPayAmount(BigDecimal payAmount)
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount()
    {
        return payAmount;
    }

    public void setPayType(String payType)
    {
        this.payType = payType;
    }

    public String getPayType()
    {
        return payType;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    
    public void setPayTime(String payTime)
    {
        this.payTime = payTime;
    }

    public String getPayTime()
    {
        return payTime;
    }
    
    public void setShipTime(String shipTime)
    {
        this.shipTime = shipTime;
    }

    public String getShipTime()
    {
        return shipTime;
    }
    
    public void setFinishTime(String finishTime)
    {
        this.finishTime = finishTime;
    }

    public String getFinishTime()
    {
        return finishTime;
    }
    
    public void setCancelTime(String cancelTime)
    {
        this.cancelTime = cancelTime;
    }

    public String getCancelTime()
    {
        return cancelTime;
    }

    public void setReceiverName(String receiverName)
    {
        this.receiverName = receiverName;
    }

    public String getReceiverName()
    {
        return receiverName;
    }

    public void setReceiverPhone(String receiverPhone)
    {
        this.receiverPhone = receiverPhone;
    }

    public String getReceiverPhone()
    {
        return receiverPhone;
    }

    public void setReceiverAddress(String receiverAddress)
    {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverAddress()
    {
        return receiverAddress;
    }
    
    public void setRefundReason(String refundReason)
    {
        this.refundReason = refundReason;
    }

    public String getRefundReason()
    {
        return refundReason;
    }
    
    public void setRating(Integer rating)
    {
        this.rating = rating;
    }

    public Integer getRating()
    {
        return rating;
    }
    
    public void setComment(String comment)
    {
        this.comment = comment;
    }

    public String getComment()
    {
        return comment;
    }
    
    public void setReviewTime(String reviewTime)
    {
        this.reviewTime = reviewTime;
    }

    public String getReviewTime()
    {
        return reviewTime;
    }
    
    public void setOrderRemark(String orderRemark)
    {
        this.orderRemark = orderRemark;
    }

    public String getOrderRemark()
    {
        return orderRemark;
    }

    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }
    
    public List<OrderItem> getItems() 
    {
        return items;
    }

    public void setItems(List<OrderItem> items) 
    {
        this.items = items;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("orderNo", getOrderNo())
                .append("openid", getOpenid())
                .append("addressId", getAddressId())
                .append("totalAmount", getTotalAmount())
                .append("payAmount", getPayAmount())
                .append("payType", getPayType())
                .append("status", getStatus())
                .append("payTime", getPayTime())
                .append("shipTime", getShipTime())
                .append("finishTime", getFinishTime())
                .append("cancelTime", getCancelTime())
                .append("receiverName", getReceiverName())
                .append("receiverPhone", getReceiverPhone())
                .append("receiverAddress", getReceiverAddress())
                .append("refundReason", getRefundReason())
                .append("rating", getRating())
                .append("comment", getComment())
                .append("reviewTime", getReviewTime())
                .append("orderRemark", getOrderRemark())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}